/*
*	var weuiMessage = require('../layer/weuimessage');
*   weuiMessage("我是中国人",{});
*
*/
var builder = require("../../mlib/layer/builder");
var merge = require("mlib/json/merge");
var alertRender = require("../layer/weuimessage.ejs");

module.exports = function(msg,opts,callback) {
    opts = merge({        
        "content" : msg || "领取成功", // 消息内容
		"time" : 3E3
    }, opts || {});
	
    var m_message = null ;

    m_message = builder.createFromHTML(alertRender(opts), {
        "mask": false
    });

    m_message.show({
    	"afterAnimate":function(){
			var container = m_message.getOuter();
			setTimeout(function () {
				m_message.hide();
			}, opts.time);
    	}
    });
    m_message.setMiddle();
    m_message.setTop();
}

